package com.gonsin.gview.logic.parser;

import java.util.concurrent.atomic.AtomicInteger;

public class IdUtils {

    private static AtomicInteger dataId = new AtomicInteger(0);
    private static AtomicInteger buttonId = new AtomicInteger(0);

    public static String nextDataId() {
        return "dataId_" + dataId.incrementAndGet();
    }

    public static String nextDataId(String dataSource) {
        return "dataId_" + dataId.incrementAndGet() + " " + dataSource;
    }

    public static String nextButtonId(){
        return "buttonId_" + buttonId.incrementAndGet();
    }

    public static String nextButtonId(String originAction){
        return "buttonId_" + buttonId.incrementAndGet() + " " + originAction;
    }
    
}
